from api.login import LoginAPI
from config import LOGIN_DATA


# 创建测试类
class TestLoginAPI:
    # 前置处理
    def setup_class(self):
        self.login_api = LoginAPI()

    def test01_login_success(self):
        response = self.login_api.login(LOGIN_DATA)

        assert 200 == response.status_code
        assert "成功" in response.json().get("description")
        assert "成功" in response.text
